﻿<%
'call showpage_num(strFileName,totalput,MaxPerPage,true)
sub showpage_num(sfilename,totalnumber,maxperpage,ShowTotal)
dim n
	
	if totalnumber mod maxperpage=0 then
    	n= totalnumber \ maxperpage
  	else
    	n= totalnumber \ maxperpage+1
  	end if
    response.write"<div class=""page"">"

	 if n>1 then
		if ShowTotal=true then
		 response.Write "第<font color=""FA8100"">"&currentPage&"</font>页/共"&n&"页&nbsp;&nbsp;"
		end if
		
		if currentPage<=1 then
		 Response.Write ("<span class=""next"">首 页</span>")        
		 Response.Write ("<span class=""next"">上一页</span>")
		else        
		 Response.Write("<A href="""&sfilename&"page=1"" class=""next"" title=""首 页"">首 页</A>")
		 Response.Write("<A href="""&sfilename&"page="&(currentPage-1)&""" class=""next"" title=""上一页"">上一页</A>")
		end if
		
		if currentPage>10 then
		   response.write"<a href="""&sfilename&"page="&(((cstr(currentPage)\10)-1)*10)+1&""" title=""上十条"" class=""next""><<</a>"
		end if
		q=(cstr(currentPage)-1)\10
		if q<0 then
		   q=1
		end if
		p=(q*10)+1
		do while p<((q*10)+11)
		   If p=currentPage Then                        
			  Response.Write "<span>"&p&"</span>"
		   Elseif p<=n then
			  Response.Write "<a href="""&sfilename&"page="&p&""">"&p&"</a>"
		   End If
		   p=p+1
		loop
		A=n
		if (A mod 10)=0 then
			A=n-1
		end if
		if currentPage<=(A\10)*10 then
		   response.write"<a href="""&sfilename&"page="&((((cstr(currentPage)-1)\10)+1)*10)+1&""" title=""下十条"" class=""next"">>></a>"
		end if

		if currentPage>=n then
		 Response.Write ("<span class=""next"">下一页</span>")
		 Response.Write ("<span class=""next"">尾 页</span>")            
		else
		 Response.Write("<A href="""&sfilename&"page="&(currentPage+1)&""" class=""next"" title=""下一页"">下一页</A>")
		 Response.Write("<A href="""&sfilename&"page="&n&""" class=""next"" title=""尾 页"">尾 页</A>")            
		end if
	 End If
	 Response.Write ("</div>")
end sub

'call showpage_num_en(strFileName,totalput,MaxPerPage,true)
sub showpage_num_en(sfilename,totalnumber,maxperpage,ShowTotal)
dim n
	
	if totalnumber mod maxperpage=0 then
    	n= totalnumber \ maxperpage
  	else
    	n= totalnumber \ maxperpage+1
  	end if
    response.write"<div class=""page"">"

	 if n>1 then
		if ShowTotal=true then
		 response.Write "<font color=""FA8100"">"&currentPage&"</font>/"&n&"&nbsp;&nbsp;"
		end if
		
		if currentPage<=1 then
		 response.write "<span class=""next""><font face='webdings'>9</font></span><span class=""next""><font face='webdings'>7</font></span>"
		else        
		 Response.Write("<A href="""&sfilename&"page=1"" class=""next""><font face='webdings' title='Homepage'>9</font></A>")
		 Response.Write("<A href="""&sfilename&"page="&(currentPage-1)&""" class=""next""><font face='webdings' title='Previous'>7</font></A>")
		end if
		
		if currentPage>10 then
		   response.write"<a href="""&sfilename&"page="&(((cstr(currentPage)\10)-1)*10)+1&""" class=""next"" title='Previous ten'><<</a>"
		end if
		q=(cstr(currentPage)-1)\10
		if q<0 then
		   q=1
		end if
		p=(q*10)+1
		do while p<((q*10)+11)
		   If p=currentPage Then                        
			 Response.Write "<span>"&p&"</span>"
		   Elseif p<=n then
			  Response.Write "<a href="""&sfilename&"page="&p&""">"&p&"</a>"
		   End If
		   p=p+1
		loop
		A=n
		if (A mod 10)=0 then
			A=n-1
		end if
		if currentPage<=(A\10)*10 then
		   response.write"<a href="""&sfilename&"page="&((((cstr(currentPage)-1)\10)+1)*10)+1&""" class=""next"" title='Next ten'>>></a>"
		end if
	
		if currentPage>=n then
		 response.write "<span class=""next""><font face='webdings'>8</font></span><span class=""next""><font face='webdings'>:</font></span>"        
		else
		 Response.Write("<A href="""&sfilename&"page="&(currentPage+1)&""" class=""next""><font face='webdings' title='Next'>8</font></a>")
		 Response.Write("<A href="""&sfilename&"page="&n&""" class=""next""><font face='webdings' title='Last'>:</font></a>")            
		end if
	 End If
	 Response.Write ("</div>")
end sub

'call showpage(strFileName,totalput,MaxPerPage,true,"条","0","0")
'参数：linkcss1 td 样式
'参数：linkcss2 a 样式
sub showpage(sfilename,totalnumber,maxperpage,ShowTotal,strUnit,linkcss1,linkcss2)
	dim n,f,ys1,ys2
	if linkcss1<>"0" then
	ys1="class='"&linkcss1&"'"
	else
	ys1=""
	end if
	if linkcss2<>"0" then
	ys2="class='"&linkcss2&"'"
	else
	ys2=""
	end if
	if totalnumber mod maxperpage=0 then
    	n= totalnumber \ maxperpage
  	else
    	n= totalnumber \ maxperpage+1
  	end if
	response.write"<table align=""center"" width=""100%"" height=""50""><tr><td "&ys1&" align=""center"">"
	if ShowTotal=true then
     response.write "共<b><font color=""FA8100"">"&totalnumber&"</font></b>"&strUnit&" <b><font color=""FA8100"">"&MaxPerPage&"</font></b>"&strUnit&"记录/页  "
	end if
    if currentPage<2 then      
     response.write "首页 上一页&nbsp;"
    else
     response.write "<a href="""&sfilename&"page=1 "&ys2&""">首页</a>&nbsp;"
     response.write "<a href="""&sfilename&"page="&(currentPage-1)&" "&ys2&""">上一页</a>&nbsp;"
    end if
    if n-currentPage<1 then
     response.write "下一页 尾页"
    else
     response.write "<a href="""&sfilename&"page=" & (CurrentPage+1) & " "&ys2&""">下一页</a> "
     response.write "<a href="""&sfilename&"page="&n&" "&ys2&""">尾页</a>"
     end if
	response.write "&nbsp;页次：<strong><font color=FA8100>"&CurrentPage&"</font>/"&n&"</strong>页"
    response.write "&nbsp;转到：第"%>&nbsp;<select name="menu1" id="menu1" onChange="MM_jumpMenu('self',this,0)">
<%
    pg=request("page")
    pg=int(pg)
    for f=1 to n
    if f=pg then%>
     <option value="<%=sfilename%>page=<%=f%>" selected><%=f%></option>
    <%else%>
     <option value="<%=sfilename%>page=<%=f%>"><%=f%></option>
    <%end if:next%>
    </select>&nbsp;页
<script type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</td></tr></table>
<%
end sub

'call showpage_en(strFileName,totalput,MaxPerPage,true,"page","0","0")
'参数：linkcss1 td 样式
'参数：linkcss2 a 样式
sub showpage_en(sfilename,totalnumber,maxperpage,ShowTotal,strUnit,linkcss1,linkcss2)
	dim n,f,ys1,ys2
	if linkcss1<>"0" then
	ys1="class='"&linkcss1&"'"
	else
	ys1=""
	end if
	if linkcss2<>"0" then
	ys2="class='"&linkcss2&"'"
	else
	ys2=""
	end if
	if totalnumber mod maxperpage=0 then
    	n= totalnumber \ maxperpage
  	else
    	n= totalnumber \ maxperpage+1
  	end if
	response.write"<table align=""center"" width=""100%"" height=""50"" border=""0""><tr><td "&ys1&" align=""center"">"
	if ShowTotal=true then
     response.write "Sum&nbsp;<b><font color=""FA8100"">"&totalnumber&"</font></b>&nbsp;"&strUnit&"&nbsp;&nbsp;"
	end if
    if currentPage<2 then      
     response.write "<font face='webdings' title='Homepage'>9</font> <font face='webdings' title='Previous'>7</font>&nbsp;"
    else
     response.write "<a href="""&sfilename&"page=1 "&ys2&"""><font face='webdings' title='Homepage'>9</font></a>&nbsp;"
     response.write "<a href="""&sfilename&"page="&(currentPage-1)&" "&ys2&"""><font face='webdings' title='Previous'>7</font></a>&nbsp;"
    end if
    if n-currentPage<1 then
     response.write "<font face='webdings' title='Next'>8</font> <font face='webdings' title='Last'>:</font>"
    else
     response.write "<a href="""&sfilename&"page=" & (CurrentPage+1) & " "&ys2&"""><font face='webdings' title='Next'>8</font></a>&nbsp;"
     response.write "<a href="""&sfilename&"page="&n&" "&ys2&"""><font face='webdings' title='Last'>:</font></a>"
     end if
    response.write "&nbsp;&nbsp;Go:"%>&nbsp;<select name="menu1" id="menu1" onChange="MM_jumpMenu('self',this,0)">
<%
    pg=request("page")
    pg=int(pg)
    for f=1 to n
    if f=pg then%>
     <option value="<%=sfilename%>page=<%=f%>" selected><%=f%></option>
    <%else%>
     <option value="<%=sfilename%>page=<%=f%>"><%=f%></option>
    <%end if:next%>
    </select>&nbsp;Page
<script type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</td></tr></table>
<%
end sub

'call showpage_num1(strFileName,totalput,MaxPerPage,true,"0","0")
'参数：linkcss1 td 样式
'参数：linkcss2 a 样式
sub showpage_num1(sfilename,totalnumber,maxperpage,ShowTotal,linkcss1,linkcss2)
dim n,ys1,ys2
	if linkcss1<>"0" then
	ys1="class='"&linkcss1&"'"
	else
	ys1=""
	end if
	
	if linkcss2<>"0" then
	ys2="class='"&linkcss2&"'"
	else
	ys2=""
	end if
	
	if totalnumber mod maxperpage=0 then
    	n= totalnumber \ maxperpage
  	else
    	n= totalnumber \ maxperpage+1
  	end if
    response.write"<table align=""center"" width=""100%"" height=""50"" border=""0""><tr><td "&ys1&" align='center' >"

   if n>1 then
	if ShowTotal=true then
	 response.Write "第<font  color='FA8100'>"&currentPage&"</font>页/共"&n&"页&nbsp;&nbsp;"
	end if
	
	if currentPage<=1 then
	 Response.Write ("首 页 " & vbCrLf)        
	 Response.Write ("上一页 " & vbCrLf)
	else        
	 Response.Write("<A href=" & sfilename & "page=1 "&ys2&" >首 页</A> " & vbCrLf)
	 Response.Write("<A href=" & sfilename & "page=" & (currentPage-1) & " "&ys2&" >上一页</A> " & vbCrLf)
	end if
	
	if currentPage>10 then
	   response.write"<a href=" & sfilename & "page="&(((cstr(currentPage)\10)-1)*10)+1&" "&ys2&">&nbsp;<<&nbsp;</a>&nbsp;&nbsp;"
	end if
	q=(cstr(currentPage)-1)\10
	if q<0 then
	   q=1
	end if
	p=(q*10)+1
	do while p<((q*10)+11)
	   If p=currentPage Then                        
		  Response.Write "<font color=""#FF0000"">&nbsp;["&p&"]&nbsp;</font>"&""
	   Elseif p<=n then
		  Response.Write "<a href=" & sfilename & "page="&p&" "&ys2&">&nbsp;"& p &"&nbsp;</a>&nbsp;"
	   End If
	   p=p+1
	loop
	A=n
	if (A mod 10)=0 then
		A=n-1
	end if
	if currentPage<=(A\10)*10 then
	   response.write"<a href=" & sfilename & "page="&((((cstr(currentPage)-1)\10)+1)*10)+1&" "&ys2&">&nbsp;>>&nbsp;</a>&nbsp;&nbsp"
	end if

	if currentPage>=n then
	 Response.Write ("下一页 "& vbCrLf)
	 Response.Write ("尾 页 " & vbCrLf)            
	else
	 Response.Write("<A href=" & sfilename & "page=" & (currentPage+1) & " "&ys2&">下一页</A> " & vbCrLf)
	 Response.Write("<A href=" & sfilename & "page=" & n & " "&ys2&" >尾 页</A> " & vbCrLf)            
	end if
   End If
   Response.Write ("</td></tr></table>")
end sub

'call showpage_num_en1(strFileName,totalput,MaxPerPage,true,"0","0")
'参数：linkcss1 td 样式
'参数：linkcss2 a 样式
sub showpage_num_en1(sfilename,totalnumber,maxperpage,ShowTotal,linkcss1,linkcss2)
dim n,ys1,ys2
	if linkcss1<>"0" then
	ys1="class='"&linkcss1&"'"
	else
	ys1=""
	end if
	
	if linkcss2<>"0" then
	ys2="class='"&linkcss2&"'"
	else
	ys2=""
	end if
	
	if totalnumber mod maxperpage=0 then
    	n= totalnumber \ maxperpage
  	else
    	n= totalnumber \ maxperpage+1
  	end if
    response.write"<table align=""center"" width=""100%"" height=""50"" border=""0""><tr><td "&ys1&" align='center' >"

   if n>1 then
	if ShowTotal=true then
	 response.Write "<font  color='FA8100'>"&currentPage&"</font>/"&n&"&nbsp;&nbsp;"
	end if
	
	if currentPage<=1 then
	 response.write "<font face='webdings' title='Homepage'>9</font> <font face='webdings' title='Previous'>7</font>&nbsp;"
	else        
	 Response.Write("<A href=" & sfilename & "page=1 "&ys2&" ><font face='webdings' title='Homepage'>9</font></A>&nbsp; " & vbCrLf)
	 Response.Write("<A href=" & sfilename & "page=" & (currentPage-1) & " "&ys2&" ><font face='webdings' title='Previous'>7</font></A>&nbsp; " & vbCrLf)
	end if
	
	if currentPage>10 then
	   response.write"<a href=" & sfilename & "page="&(((cstr(currentPage)\10)-1)*10)+1&" "&ys2&">&nbsp;<<&nbsp;</a>&nbsp;&nbsp;"
	end if
	q=(cstr(currentPage)-1)\10
	if q<0 then
	   q=1
	end if
	p=(q*10)+1
	do while p<((q*10)+11)
	   If p=currentPage Then                        
		  Response.Write "<font color=""#FF0000"">&nbsp;["&p&"]&nbsp;</font>"&""
	   Elseif p<=n then

		  Response.Write "<a href=" & sfilename & "page="&p&" "&ys2&">&nbsp;"& p &"&nbsp;</a>&nbsp;"
	   End If
	   p=p+1
	loop
	A=n
	if (A mod 10)=0 then
		A=n-1
	end if
	if currentPage<=(A\10)*10 then
	   response.write"<a href=" & sfilename & "page="&((((cstr(currentPage)-1)\10)+1)*10)+1&" "&ys2&">&nbsp;>>&nbsp;</a>&nbsp;&nbsp"
	end if

	if currentPage>=n then
	 response.write "<font face='webdings' title='Next'>8</font> <font face='webdings' title='Last'>:</font>"        
	else
	 Response.Write("<A href=" & sfilename & "page=" & (currentPage+1) & " "&ys2&"><font face='webdings' title='Next'>8</font></a>&nbsp; " & vbCrLf)
	 Response.Write("<A href=" & sfilename & "page=" & n & " "&ys2&" ><font face='webdings' title='Last'>:</font></a> " & vbCrLf)            
	end if
   End If
   Response.Write ("</td></tr></table>")
end sub
%>